﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EBOOK.admin
{
    public partial class index : System.Web.UI.Page
    {
        COM.DTO.User user = new COM.DTO.User();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session[COM.CONST.SESSION.USER] == null)
            {
                Response.Redirect(COM.CONST.PAGE.ADMIN_LOGIN);
            }
            else
            {
                user = (COM.DTO.User)Session[COM.CONST.SESSION.USER];
                if (user.Role.RoleId > COM.CONST.ROLE.HOTELOWNER) // Role lower
                {
                    Response.Redirect(COM.CONST.PAGE.ADMIN_LOGIN);
                }

            }
        }
    }
}